Little changes on Colombian Programming Contest solutions.
[and.git] / 10195 - Knights of the round table / 10195.cpp
blob412d7fdf6325a733d3ae24706d2a34dbade47246
1 #include <iostream>
2 #include <math.h>
3 #include <cassert>
5 using namespace std;
7 main(){
8 double a,b,c,s,r, temp;
9 while (cin >> a >> b >> c){
10 s = (a+b+c)/2;
11 temp = s*(s-a)*(s-b)*(s-c);
12 assert(temp >= 0);
13 //cout << "s es : " << s << endl;
14 if (s==0.0)
15 r = 0.0;
16 else
17 r = sqrt(temp)/s;
18 printf("The radius of the round table is: %0.3f\n", floor(r*1000+0.5)/1000);
20 return 0;